//
//  main.c
//  class
//
//  Created by mac on 16-4-12.
//  Copyright (c) 2016年 zzn. All rights reserved.
//

#include "stdio.h"
int main()
{
    /*    int a[]={1,2,3,4,5,6,7,8,9,10,11,12,13,14};
     
     int j=0;
     int a_long=sizeof(a)/sizeof(int);
     //int b[a_long]={0};
     int b[50]={0};
     
     int * pa = a;
     int * pb = b;
     
     printf("数组a的长度为:%d\n",a_long);
     for (int i=0;i<a_long;i++) {
     if (*(pa+i)>20) {
     *(pb+j)=*(pa+i);
     j=j+1;
     }
     }
     for (int i=0;b[i]!=0;i++)
     {
     printf("%d ",*(pb+i));
     }*/
    
    
    
    
    
    /*  char strs[100]={'\0'};
     int count[27]={0};
     printf("请输入字符串:");
     scanf("%s",strs);
     printf("%s\n",strs);
     for (int i=0; strs[i]; i++)
     {
     switch (strs[i]) {
     case 'a':
     count[0]++;
     break;
     case 'b':
     count[1]++;
     break;
     case 'c':
     count[2]++;
     break;
     case 'd':
     count[3]++;
     break;
     case 'e':
     count[4]++;
     break;
     default:
     count[5]++;
     break;
     }
     }
     printf("a:%d\nb:%d\nc:%d\nd:%d\ne:%d\n其他:%d\n",count[0],count[1],count[2],count[3],count[4],count[5]);
     return 0;
     */
    
    /*   char a[]="I am a girl";
     char b[20]={'\0'};
     char * pa =a;
     char * pb =b;
     for (;*pa!='\0'; pa++, pb++) {
     *pb=*pa;
     }
     printf("b:%s\n",b);
     */
    
    
    char s1[50]="hello word!";
    char s2[]="hnd yaoming";
    for (int i=0;i<5;i++) {
        s2[i]=s1[i];
    }
    s2[5]='\0';
    printf("s2:%s\n",s2);
    
    
    
    
}
